// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'

import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';
import './icons';
import echarts from 'echarts'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import Nodata from '@/components/nodata'; //无数据组件
import ColorBar from '@/components/colorbar'; //无数据组件
import store from "@/store/index";
import utils from "@/utils/index";
import {getOrgList} from '@/utils/common';

import router from './router'

import '@/assets/css/app.scss';

var e = ["#5f8bfc", "#44bf97", "#ffc130",
 "#ffdc8f", "#ff977b", "#ff7394", "#f95578",
  "#e24d55", "#de7bff", "#8f80ff", "#526bff", "#55baff"];
echarts.registerTheme("color2", {
 color: e,
 backgroundColor: "#fff",
 graph: {
     color: e
 },
 title: {
     top: 0,
     left: 0,
     textStyle: {
         fontSize: 16,
         fontWeight: "normal",
         color: "#787878"
     }
 },
 grid: {
     top: "23%",
     left: 0,
     right: 10,
     bottom: 80,
     containLabel: !0
 }
})




// 注册到全局

Vue.prototype.$echarts = echarts
Vue.prototype.$tools = utils
Vue.prototype.$getOrgList = getOrgList;
Vue.config.productionTip = false
Vue.use(ViewUI);
Vue.use(ElementUI);

Vue.component('Nodata', Nodata )
Vue.component('ColorBar', ColorBar )

/* eslint-disable no-new */
let vm = new Vue({
  el: '#app',
  router,
  store,
  components: { App},
  template: '<App/>'
})

export default vm